home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Interfaces / UniversalInterfaces 2.1B1 / AIncludes / ToolUtils.a < prev    next >
Encoding:
Text File  |  1995-04-18  |  5.3 KB  |  300 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ToolUtils.a
  3. ;
  4. ;    Contains:    Toolbox Utilities Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Package:    Universal Interfaces 2.1ß1 in “MPW Prerelease” on ETO #17
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__TOOLUTILS__') = 'UNDEFINED' THEN
  21. __TOOLUTILS__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  30.     include 'Quickdraw.a'
  31.     ENDIF
  32. ;        include 'MixedMode.a'                                        ;
  33. ;        include 'QuickdrawText.a'                                    ;
  34.  
  35.     IF &TYPE('__OSUTILS__') = 'UNDEFINED' THEN
  36.     include 'OSUtils.a'
  37.     ENDIF
  38. ;        include 'Memory.a'                                            ;
  39.  
  40.     IF &TYPE('__TEXTUTILS__') = 'UNDEFINED' THEN
  41.     include 'TextUtils.a'
  42.     ENDIF
  43. ;        include 'Script.a'                                            ;
  44. ;            include 'IntlResources.a'                                ;
  45. ;            include 'Events.a'                                        ;
  46.  
  47.     IF &TYPE('__FIXMATH__') = 'UNDEFINED' THEN
  48.     include 'FixMath.a'
  49.     ENDIF
  50.  
  51. sysPatListID                    EQU        0
  52. iBeamCursor                        EQU        1
  53. crossCursor                        EQU        2
  54. plusCursor                        EQU        3
  55. watchCursor                        EQU        4
  56.  
  57. Int64Bit                 RECORD    0
  58. hiLong                     ds.l   1        ; offset: $0 (0)
  59. loLong                     ds.l   1        ; offset: $4 (4)
  60. sizeof                     EQU *            ; size:   $8 (8)
  61.                         ENDR
  62.  
  63. ; typedef struct Int64Bit     Int64Bit
  64. ;
  65. ; pascal Fixed FixRatio(short numer, short denom)
  66. ;
  67.     IF ¬ GENERATINGCFM THEN
  68.         _FixRatio:    OPWORD    $A869
  69.     ELSE
  70.         IMPORT_CFM_FUNCTION    FixRatio
  71.     ENDIF
  72.  
  73. ;
  74. ; pascal Fixed FixMul(Fixed a, Fixed b)
  75. ;
  76.     IF ¬ GENERATINGCFM THEN
  77.         _FixMul:    OPWORD    $A868
  78.     ELSE
  79.         IMPORT_CFM_FUNCTION    FixMul
  80.     ENDIF
  81.  
  82. ;
  83. ; pascal short FixRound(Fixed x)
  84. ;
  85.     IF ¬ GENERATINGCFM THEN
  86.         _FixRound:    OPWORD    $A86C
  87.     ELSE
  88.         IMPORT_CFM_FUNCTION    FixRound
  89.     ENDIF
  90.  
  91. ;
  92. ; pascal void PackBits(Ptr *srcPtr, Ptr *dstPtr, short srcBytes)
  93. ;
  94.     IF ¬ GENERATINGCFM THEN
  95.         _PackBits:    OPWORD    $A8CF
  96.     ELSE
  97.         IMPORT_CFM_FUNCTION    PackBits
  98.     ENDIF
  99.  
  100. ;
  101. ; pascal void UnpackBits(Ptr *srcPtr, Ptr *dstPtr, short dstBytes)
  102. ;
  103.     IF ¬ GENERATINGCFM THEN
  104.         _UnpackBits:    OPWORD    $A8D0
  105.     ELSE
  106.         IMPORT_CFM_FUNCTION    UnpackBits
  107.     ENDIF
  108.  
  109. ;
  110. ; pascal Boolean BitTst(const void *bytePtr, long bitNum)
  111. ;
  112.     IF ¬ GENERATINGCFM THEN
  113.         _BitTst:    OPWORD    $A85D
  114.     ELSE
  115.         IMPORT_CFM_FUNCTION    BitTst
  116.     ENDIF
  117.  
  118. ;
  119. ; pascal void BitSet(void *bytePtr, long bitNum)
  120. ;
  121.     IF ¬ GENERATINGCFM THEN
  122.         _BitSet:    OPWORD    $A85E
  123.     ELSE
  124.         IMPORT_CFM_FUNCTION    BitSet
  125.     ENDIF
  126.  
  127. ;
  128. ; pascal void BitClr(void *bytePtr, long bitNum)
  129. ;
  130.     IF ¬ GENERATINGCFM THEN
  131.         _BitClr:    OPWORD    $A85F
  132.     ELSE
  133.         IMPORT_CFM_FUNCTION    BitClr
  134.     ENDIF
  135.  
  136. ;
  137. ; pascal long BitAnd(long value1, long value2)
  138. ;
  139.     IF ¬ GENERATINGCFM THEN
  140.         _BitAnd:    OPWORD    $A858
  141.     ELSE
  142.         IMPORT_CFM_FUNCTION    BitAnd
  143.     ENDIF
  144.  
  145. ;
  146. ; pascal long BitOr(long value1, long value2)
  147. ;
  148.     IF ¬ GENERATINGCFM THEN
  149.         _BitOr:    OPWORD    $A85B
  150.     ELSE
  151.         IMPORT_CFM_FUNCTION    BitOr
  152.     ENDIF
  153.  
  154. ;
  155. ; pascal long BitXor(long value1, long value2)
  156. ;
  157.     IF ¬ GENERATINGCFM THEN
  158.         _BitXor:    OPWORD    $A859
  159.     ELSE
  160.         IMPORT_CFM_FUNCTION    BitXor
  161.     ENDIF
  162.  
  163. ;
  164. ; pascal long BitNot(long value)
  165. ;
  166.     IF ¬ GENERATINGCFM THEN
  167.         _BitNot:    OPWORD    $A85A
  168.     ELSE
  169.         IMPORT_CFM_FUNCTION    BitNot
  170.     ENDIF
  171.  
  172. ;
  173. ; pascal long BitShift(long value, short count)
  174. ;
  175.     IF ¬ GENERATINGCFM THEN
  176.         _BitShift:    OPWORD    $A85C
  177.     ELSE
  178.         IMPORT_CFM_FUNCTION    BitShift
  179.     ENDIF
  180.  
  181.     IF GENERATING68K  THEN
  182. ;
  183. ; pascal void LongMul(long a, long b, Int64Bit *result)
  184. ;
  185.     IF ¬ GENERATINGCFM THEN
  186.         _LongMul:    OPWORD    $A867
  187.     ELSE
  188.         IMPORT_CFM_FUNCTION    LongMul
  189.     ENDIF
  190.  
  191.     ENDIF
  192.     IF OLDROUTINELOCATIONS  THEN
  193. ;
  194. ; pascal Handle GetIcon(short iconID)
  195. ;
  196.     IF ¬ GENERATINGCFM THEN
  197.         _GetIcon:    OPWORD    $A9BB
  198.     ELSE
  199.         IMPORT_CFM_FUNCTION    GetIcon
  200.     ENDIF
  201.  
  202. ;
  203. ; pascal void PlotIcon(const Rect *theRect, Handle theIcon)
  204. ;
  205.     IF ¬ GENERATINGCFM THEN
  206.         _PlotIcon:    OPWORD    $A94B
  207.     ELSE
  208.         IMPORT_CFM_FUNCTION    PlotIcon
  209.     ENDIF
  210.  
  211.     ENDIF
  212. ;
  213. ; pascal PatHandle GetPattern(short patternID)
  214. ;
  215.     IF ¬ GENERATINGCFM THEN
  216.         _GetPattern:    OPWORD    $A9B8
  217.     ELSE
  218.         IMPORT_CFM_FUNCTION    GetPattern
  219.     ENDIF
  220.  
  221. ;
  222. ; pascal CursHandle GetCursor(short cursorID)
  223. ;
  224.     IF ¬ GENERATINGCFM THEN
  225.         _GetCursor:    OPWORD    $A9B9
  226.     ELSE
  227.         IMPORT_CFM_FUNCTION    GetCursor
  228.     ENDIF
  229.  
  230. ;
  231. ; pascal PicHandle GetPicture(short pictureID)
  232. ;
  233.     IF ¬ GENERATINGCFM THEN
  234.         _GetPicture:    OPWORD    $A9BC
  235.     ELSE
  236.         IMPORT_CFM_FUNCTION    GetPicture
  237.     ENDIF
  238.  
  239. ;
  240. ; pascal Fixed SlopeFromAngle(short angle)
  241. ;
  242.     IF ¬ GENERATINGCFM THEN
  243.         _SlopeFromAngle:    OPWORD    $A8BC
  244.     ELSE
  245.         IMPORT_CFM_FUNCTION    SlopeFromAngle
  246.     ENDIF
  247.  
  248. ;
  249. ; pascal short AngleFromSlope(Fixed slope)
  250. ;
  251.     IF ¬ GENERATINGCFM THEN
  252.         _AngleFromSlope:    OPWORD    $A8C4
  253.     ELSE
  254.         IMPORT_CFM_FUNCTION    AngleFromSlope
  255.     ENDIF
  256.  
  257. ;
  258. ; pascal long DeltaPoint(Point ptA, Point ptB)
  259. ;
  260.     IF ¬ GENERATINGCFM THEN
  261.         _DeltaPoint:    OPWORD    $A94F
  262.     ELSE
  263.         IMPORT_CFM_FUNCTION    DeltaPoint
  264.     ENDIF
  265.  
  266. ;
  267. ; pascal void ShieldCursor(const Rect *shieldRect, Point offsetPt)
  268. ;
  269.     IF ¬ GENERATINGCFM THEN
  270.         _ShieldCursor:    OPWORD    $A855
  271.     ELSE
  272.         IMPORT_CFM_FUNCTION    ShieldCursor
  273.     ENDIF
  274.  
  275. ;
  276. ; pascal void ScreenRes(short *scrnHRes, short *scrnVRes)
  277. ;
  278.     IF ¬ GENERATINGCFM THEN
  279.         Macro
  280.         _ScreenRes
  281.             dc.w     $225F
  282.             dc.w     $32B8
  283.             dc.w     $0102
  284.             dc.w     $225F
  285.             dc.w     $32B8
  286.             dc.w     $0104
  287.         EndM
  288.     ELSE
  289.         IMPORT_CFM_FUNCTION    ScreenRes
  290.     ENDIF
  291.  
  292. ;
  293. ; pascal void GetIndPattern(Pattern *thePat, short patternListID, short index)
  294. ;
  295.     IF GENERATINGCFM THEN
  296.         IMPORT_CFM_FUNCTION    GetIndPattern
  297.     ENDIF
  298.  
  299.     ENDIF ; __TOOLUTILS__
  300.